package com.xframe.domain.e3sp.basedata;

import com.xframe.domain.BaseModel;
import com.xframe.domain.sys.SysValueDetail;
import com.xframe.xdal.core.annotation.*;
import com.xframe.xdal.core.constant.AutoFillType;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @Description: PC
 * @ClassName: com.xframe.domain.e3sp.basedata.Pc
 * @Author: lmx
 * @CreateTime: 2024/01/02
 **/
@Data
@Accessors(chain=true)
@XTable(value = "p_t01_pc", label = "PC")
@XSelectItem(keyName = "pcId",codeName = "pc",textName = "nameCn")
@XSelectItem(keyName = "pcId",codeName = "pc",textName = "nameEn",language = "en")
@XBelongsTo(typeName = "com.xframe.domain.e3sp.basedata.PartCategory",foreignKey = "categoryId", targetKey = "categoryId",as = "refPartCategory")
@XBelongsTo(typeName = "com.xframe.domain.e3sp.basedata.Dc",foreignKey = "dcId", targetKey = "dcId",as = "refDc")
public class Pc extends BaseModel {
    /**
     * PCID
     */
    @AutoFill(AutoFillType.Snowflake)
    @XColumn(name = "pc_id", primaryKeyFlag = true,desc = "PCID")
    private Long pcId;

    /**
     * 备件类别ID
     */
    @XQueryCondition
    @XColumn(name = "category_id",desc = "备件类别ID",nullFlag = true)
    private Long categoryId;

    /**
     * DCID
     */
    @XQueryCondition
    @XColumn(name = "dc_id",desc = "DCID")
    private Long dcId;


    /**
     * PC
     */
    @XQueryCondition
    @XColumn(name = "pc", uniqueFlag = true,desc = "PC",length = 200)
    private String pc;


    /**
     * 中文名称
     */
    @XQueryCondition
    @XColumn(name = "name_cn",desc = "中文名称",length = 200)
    private String nameCn;

    /**
     * 英文名称
     */
    @XQueryCondition
    @XColumn(name = "name_en",desc = "英文名称",length = 200,nullFlag = true)
    private String nameEn;

    /**
     * 备注
     */
    @XColumn(name = "remark",desc = "备注",length = 500,nullFlag = true)
    private String remark;


    /**
     * 所属Dc
     */
    private Dc refDc;

    /**
     * 所属备件类别
     */
    private PartCategory refPartCategory;
}
